package io;

import com.google.common.collect.Maps;
import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @Author: ycy
 * @CreateDate: 2019/8/19 12:14
 */
public class FileDemo4 {
  public static void main(String[] args) {

    try {
      List<String> train = FileUtils.readLines(new File("D:\\Users\\yincy\\Desktop\\code.txt"), "UTF-8");


      Map<String,String > map = Maps.newTreeMap();
      for (String s : train) {
        String[] split = s.split("=");
        String s1 = split[0];
        map.put(s1,s1);
      }


      for (String s : map.keySet()) {
        System.out.println(s);
      }

    } catch (IOException e) {
      e.printStackTrace();
    }

  }

}
